Skip to content

net: snapshot capability and community version in host_data (P2) - #101

Merged
EnzinoBB merged 3 commits into
masterfrom
feat/snapshot-p2p-capability
Oct 25, 2026
Merged

EnzinoBB merged 3 commits into
masterfrom
feat/snapshot-p2p-capability

Conversation

@EnzinoBB

Copy link
Copy Markdown
Collaborator

Step P2 of docs/plans/2026-10-25-snapshot-p2p-plan.md (design 4.1, decision 15.5).

  • net/include/net/hostdata.hpp: encode/decode of host_data. Bits 0-23 keep the official layout (platform, node version); bit 24 = answers snapshot requests ([snapshot] serve=on at start; fixed for the life of the process); bits 32-47 = MINOR_NODE_VERSION; 48-63 stay 0.
  • MINOR_NODE_VERSION = 13 (the coming community release; it was 0, the same as official nodes, so it told nothing). It is logged at start ("Node version is 532.13") and written in snapshot manifests; nothing compares it. It moves with each release from now on.
  • cs::PeerData: capabilities, minorVersion; Transport::getKnownPeers fills them; Transport::peerCapabilities(key, caps) looks one peer up in the routing table (for the fetcher, P4).
  • known_peers.json next to the hosts file at a clean stop: {id, ip, port, version, minor, platform, capabilities} per known peer. known_hosts.txt is unchanged.
  • ci/testnet/run.sh: SNAPSHOT_SERVE_NODES; at the end a non-serving node of this build is stopped and its known_peers.json must list exactly the serving nodes with the capability. Robustness scenario snapshot-capability.
  • Tests: tests/csnode/hostdata_tests.cpp.

Official nodes read bits 0-23 only and relay the value unchanged.

🤖 Generated with Claude Code

EnzinoBB and others added 2 commits October 25, 2026 09:56
Bit 24 announces snapshot serving ([snapshot] serve=on at start), bits 32-47
carry MINOR_NODE_VERSION (now 13, the community release). Peers keep the
official fields in bits 0-23. Transport::peerCapabilities looks a peer up in
the routing table; known_peers.json lists the known peers with what they
announce. run.sh SNAPSHOT_SERVE_NODES and the snapshot-capability scenario.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…own_peers.json

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t check needs block 1000)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@EnzinoBB
EnzinoBB merged commit bb7f7a6 into master Oct 25, 2026
110 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant